<?php
/**
 * The main template file
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query. 
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package dkret3
 * @since 3.6
 */

get_header(); ?>

    <div id="container">

        <?php /* dkret3 Hook */ do_action( 'dkret_before_container' ); ?>

        <div id="content" role="main">

            <?php /* dkret3 Hook */ do_action( 'dkret_before_content' ); ?>

            <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

                <div id="post-<?php the_ID() ?>" <?php post_class() ?>>

                    <?php /* dkret3 Hook */ do_action( 'dkret_before_entry' ); ?>

                    <?php if ( get_dkret_option( 'summary' ) ) : //Display Excerpts if Option is set ?>

                        <div class="entry-summary">
                        
                            <?php the_excerpt( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'dkret' ) ); ?>

                        </div><!-- .entry-summary -->

                    <?php else : ?>

                        <div class="entry-content">

                            <?php the_content( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'dkret' ) ); ?>

                            <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'dkret' ), 'after' => '</div>' ) ); ?>

                        </div><!-- .entry-content -->

                    <?php endif; ?>

                    <?php /* dkret3 Hook */ do_action( 'dkret_after_entry' ); ?>
            
                </div><!-- #post-ID -->
                    
            <?php endwhile; ?>

            <?php else: ?>

                <p class="no-data">
                    <?php _e( 'Sorry, no posts matched your criteria.', 'dkret' ); ?>
                </p><!-- .no-data -->

            <?php endif; ?>

            <?php /* dkret3 Hook */ do_action( 'dkret_after_content' ); ?>
            
        </div>

        <?php /* dkret3 Hook */ do_action( 'dkret_after_container' ); ?>

    </div>

<?php get_sidebar() ?>
<?php get_footer() ?>